const allSelection = document.getSelection()
const allRang = document.createRange()

function setCaretPosition () {
  let sel
  if (allRang != null) {
    sel = allSelection.getSelection()
    if (sel.rangeCount > 0) { sel.removeAllRanges() }
    sel.addRange(allRang)
  } else if ((sel = this.doc.selection) && sel.type != 'Control') {
    allSelection.getSelection().addRange(allRang)
  }
}


// 获取并操作文件信息
function obtainFile() {
}
export default {
  // 表情包点击
  expressionClick: function () {
  },
  // 打开文件夹
  webWechatPicClick() {
  },
  openEmoji () {

  },
  getCursor () {
    setCaretPosition()
  },
  sendMsgClick () {

  },
  uploadFile: obtainFile
}
